﻿using ModelLayer;
using System.Collections.Generic;

namespace DataAccessObjectLayer
{
    internal interface IDBPartReservation
    {
        /// <summary>
        /// Gets all part reservations in the database.
        /// </summary>
        /// <param name="resvId">The reservation identifier.</param>
        /// <returns>PartReservation.</returns>
        List<PartReservation> GetAllPartReservation(long resvId);

        /// <summary>
        /// Gets a part reservation.
        /// </summary>
        /// <param name="partResvId">The part resv identifier.</param>
        /// <returns>PartReservation.</returns>
        PartReservation GetPartReservation(long partResvId);

        /// <summary>
        /// Inserts a part reservation in the database.
        /// </summary>
        /// <param name="partResv">The part resv.</param>
        /// <param name="resvId">The resv identifier.</param>
        /// <returns>The number of affected rows</returns>
        int InsertPartReservation(PartReservation partResv, long resvId);

        /// <summary>
        /// Updates a part reservation in the database.
        /// </summary>
        /// <param name="partResv">The part resv.</param>
        /// <param name="resvId">The resv identifier.</param>
        /// <returns>The number of affected rows</returns>
        int UpdatePartReservation(PartReservation partResv, long resvId);

        /// <summary>
        /// Removes a part reservation in the database.
        /// </summary>
        /// <param name="partResv">The part resv.</param>
        /// <returns>The number of affected rows</returns>
        int RemovePartReservation(PartReservation partResv);
    }
}